{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 1. The Lists of Data Table\n",
    "### 1) Case Data\n",
    "- **Case**: Data of COVID-19 infection cases in South Korea\n",
    "\n",
    "### 2) Patient Data\n",
    "- **PatientInfo**: Epidemiological data of COVID-19 patients in South Korea\n",
    "- **PatientRoute**: Route data of COVID-19 patients in South Korea\n",
    "\n",
    "### 3) Time Series Data\n",
    "- **Time**: Time series data of COVID-19 status in South Korea\n",
    "- **TimeAge**: Time series data of COVID-19 status in terms of the age in South Korea\n",
    "- **TimeGender**: Time series data of COVID-19 status in terms of gender in South Korea\n",
    "- **TimeProvince**: Time series data of COVID-19 status in terms of the Province in South Korea\n",
    "\n",
    "### 4) Additional Data\n",
    "- **Region**: Location and statistical data of the regions in South Korea\n",
    "- **Weather**: Data of the weather in the regions of South Korea\n",
    "- **SearchTrend**: Trend data of the keywords searched in NAVER which is one of the largest portals in South Korea\n",
    "- **SeoulFloating**: Data of floating population in Seoul, South Korea (from SK Telecom Big Data Hub)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 2. The Structure of our Dataset\n",
    "- What color means is that they have similar properties.\n",
    "- If a line is connected between columns, it means that the values of the columns are partially shared.\n",
    "- The dotted lines mean weak relevance.\n",
    "![db](https://user-images.githubusercontent.com/50820635/78222744-b0824a80-7500-11ea-84d8-49775e562108.PNG)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 3. The Detailed Description of each Data Table"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "_cell_guid": "b1076dfc-b9ad-4769-8c92-a6c4dae69d19",
    "_uuid": "8f2839f25d086af736a60e9eeb907d3b93b6e0e5"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "/kaggle/input/coronavirusdataset/TimeAge.csv\n",
      "/kaggle/input/coronavirusdataset/Region.csv\n",
      "/kaggle/input/coronavirusdataset/Time.csv\n",
      "/kaggle/input/coronavirusdataset/Weather.csv\n",
      "/kaggle/input/coronavirusdataset/SearchTrend.csv\n",
      "/kaggle/input/coronavirusdataset/TimeProvince.csv\n",
      "/kaggle/input/coronavirusdataset/TimeGender.csv\n",
      "/kaggle/input/coronavirusdataset/PatientInfo.csv\n",
      "/kaggle/input/coronavirusdataset/PatientRoute.csv\n",
      "/kaggle/input/coronavirusdataset/SeoulFloating.csv\n",
      "/kaggle/input/coronavirusdataset/Case.csv\n"
     ]
    }
   ],
   "source": [
    "# This Python 3 environment comes with many helpful analytics libraries installed\n",
    "# It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python\n",
    "# For example, here's several helpful packages to load in \n",
    "\n",
    "import numpy as np # linear algebra\n",
    "import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n",
    "\n",
    "# Input data files are available in the \"../input/\" directory.\n",
    "# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\n",
    "\n",
    "import os\n",
    "for dirname, _, filenames in os.walk('/kaggle/input'):\n",
    "    for filename in filenames:\n",
    "        print(os.path.join(dirname, filename))\n",
    "\n",
    "# Any results you write to the current directory are saved as output."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "path = '/kaggle/input/coronavirusdataset/'\n",
    "\n",
    "case = p_info = pd.read_csv(path+'Case.csv')\n",
    "p_info = pd.read_csv(path+'PatientInfo.csv')\n",
    "p_route = pd.read_csv(path+'PatientRoute.csv')\n",
    "time = pd.read_csv(path+'Time.csv')\n",
    "t_age = pd.read_csv(path+'TimeAge.csv')\n",
    "t_gender = pd.read_csv(path+'TimeGender.csv')\n",
    "t_provin = pd.read_csv(path+'TimeProvince.csv')\n",
    "region = pd.read_csv(path+'Region.csv')\n",
    "weather = pd.read_csv(path+'Weather.csv')\n",
    "search = pd.read_csv(path+'SearchTrend.csv')\n",
    "floating = pd.read_csv(path+'SeoulFloating.csv')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### Before the Start..\n",
    "- We make a structured dataset based on the report materials of KCDC and local governments.\n",
    "- In Korea, we use the terms named '-do', '-si', '-gun' and '-gu',\n",
    "- The meaning of them are explained below.\n",
    "\n",
    "***\n",
    "\n",
    "\n",
    "### Levels of administrative divisions in South Korea\n",
    "#### Upper Level (Provincial-level divisions)\n",
    "- **Special City**:\n",
    "*Seoul*\n",
    "- **Metropolitan City**:\n",
    "*Busan / Daegu / Daejeon / Gwangju / Incheon / Ulsan*\n",
    "- **Province(-do)**:\n",
    "*Gyeonggi-do / Gangwon-do / Chungcheongbuk-do / Chungcheongnam-do / Jeollabuk-do / Jeollanam-do / Gyeongsangbuk-do / Gyeongsangnam-do*\n",
    "\n",
    "#### Lower Level (Municipal-level divisions)\n",
    "- **City(-si)**\n",
    "[List of cities in South Korea](https://en.wikipedia.org/wiki/List_of_cities_in_South_Korea)\n",
    "- **Country(-gun)**\n",
    "[List of counties of South Korea](https://en.wikipedia.org/wiki/List_of_counties_of_South_Korea)\n",
    "- **District(-gu)**\n",
    "[List of districts in South Korea](https://en.wikipedia.org/wiki/List_of_districts_in_South_Korea)\n",
    "\n",
    "***\n",
    "\n",
    "<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F2815958%2F1c50702025f44b0c1ce92460bd2ea3f9%2Fus_hi_30-1.jpg?generation=1582819435038273&amp;alt=media\">\n",
    "\n",
    "***\n",
    "\n",
    "Sources\n",
    "- http://nationalatlas.ngii.go.kr/pages/page_1266.php\n",
    "- https://en.wikipedia.org/wiki/Administrative_divisions_of_South_Korea"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 1) Case\n",
    "#### Data of COVID-19 infection cases in South Korea\n",
    "1. case_id: the ID of the infection case\n",
    "  > - case_id(7) = region_code(5) + case_number(2)  \n",
    "  > - You can check the region_code in 'Region.csv'\n",
    "- province: Special City / Metropolitan City / Province(-do)\n",
    "- city: City(-si) / Country (-gun) / District (-gu)\n",
    "  > - The value 'from other city' means that where the group infection started is other city.\n",
    "- group: TRUE: group infection / FALSE: not group\n",
    "  > - If the value is 'TRUE' in this column, the value of 'infection_cases' means the name of group.  \n",
    "  > - The values named 'contact with patient', 'overseas inflow' and 'etc' are not group infection. \n",
    "- infection_case: the infection case (the name of group or other cases)\n",
    "  > - The value 'overseas inflow' means that the infection is from other country.  \n",
    "  > - Tha value 'etc' includes individual cases, cases where relevance classification is ongoing after investigation, and cases under investigation.\n",
    "- confirmed: the accumulated number of the confirmed\n",
    "- latitude: the latitude of the group (WGS84)\n",
    "- longitude: the longitude of the group (WGS84)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>case_id</th>\n",
       "      <th>province</th>\n",
       "      <th>city</th>\n",
       "      <th>group</th>\n",
       "      <th>infection_case</th>\n",
       "      <th>confirmed</th>\n",
       "      <th>latitude</th>\n",
       "      <th>longitude</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1000001</td>\n",
       "      <td>Seoul</td>\n",
       "      <td>Guro-gu</td>\n",
       "      <td>True</td>\n",
       "      <td>Guro-gu Call Center</td>\n",
       "      <td>96</td>\n",
       "      <td>37.508163</td>\n",
       "      <td>126.884387</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1000002</td>\n",
       "      <td>Seoul</td>\n",
       "      <td>Dongdaemun-gu</td>\n",
       "      <td>True</td>\n",
       "      <td>Dongan Church</td>\n",
       "      <td>20</td>\n",
       "      <td>37.592888</td>\n",
       "      <td>127.056766</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1000003</td>\n",
       "      <td>Seoul</td>\n",
       "      <td>Guro-gu</td>\n",
       "      <td>True</td>\n",
       "      <td>Manmin Central Church</td>\n",
       "      <td>20</td>\n",
       "      <td>37.481059</td>\n",
       "      <td>126.894343</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1000004</td>\n",
       "      <td>Seoul</td>\n",
       "      <td>Eunpyeong-gu</td>\n",
       "      <td>True</td>\n",
       "      <td>Eunpyeong St. Mary's Hospital</td>\n",
       "      <td>14</td>\n",
       "      <td>37.63369</td>\n",
       "      <td>126.9165</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1000005</td>\n",
       "      <td>Seoul</td>\n",
       "      <td>Seongdong-gu</td>\n",
       "      <td>True</td>\n",
       "      <td>Seongdong-gu APT</td>\n",
       "      <td>13</td>\n",
       "      <td>37.55713</td>\n",
       "      <td>127.0403</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   case_id province           city  group                 infection_case  \\\n",
       "0  1000001    Seoul        Guro-gu   True            Guro-gu Call Center   \n",
       "1  1000002    Seoul  Dongdaemun-gu   True                  Dongan Church   \n",
       "2  1000003    Seoul        Guro-gu   True          Manmin Central Church   \n",
       "3  1000004    Seoul   Eunpyeong-gu   True  Eunpyeong St. Mary's Hospital   \n",
       "4  1000005    Seoul   Seongdong-gu   True               Seongdong-gu APT   \n",
       "\n",
       "   confirmed   latitude   longitude  \n",
       "0         96  37.508163  126.884387  \n",
       "1         20  37.592888  127.056766  \n",
       "2         20  37.481059  126.894343  \n",
       "3         14   37.63369    126.9165  \n",
       "4         13   37.55713    127.0403  "
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "case.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 2) PatientInfo\n",
    "#### Epidemiological data of COVID-19 patients in South Korea\n",
    "1. patient_id: the ID of the patient\n",
    "  > - patient_id(10) = region_code(5) + patient_number(5)\n",
    "  > - You can check the region_code in 'Region.csv'\n",
    "  > - There are two types of the patient_number  \n",
    "      1) local_num: The number given by the local government.  \n",
    "      2) global_num: The number given by the KCDC  \n",
    "- global_num: the number given by KCDC\n",
    "  > - There are some patients having no global_num.\n",
    "  > - The paitents in Busan doesn't have the global_num.\n",
    "- sex: the sex of the patient\n",
    "- birth_year: the birth year of the patient\n",
    "- age: the age of the patient\n",
    "  > - 0s: 0 ~ 9  \n",
    "  > - 10s: 10 ~ 19  \n",
    "  ...  \n",
    "  > - 90s: 90 ~ 99  \n",
    "  > - 100s: 100 ~ 109\n",
    "- country: the country of the patient\n",
    "- province: the province of the patient\n",
    "- city: the city of the patient\n",
    "- disease: TRUE: underlying disease / FALSE: no disease\n",
    "- infection_case: the case of infection\n",
    "- infection_order: the order of infection\n",
    "- infected_by: the ID of who infected the patient\n",
    "  > - This column refers to the  'patient_id' column. \n",
    "- contact_number: the number of contacts with people\n",
    "- symptom_onset_date: the date of symptom onset\n",
    "- confirmed_date: the date of being confirmed\n",
    "- released_date: the date of being released\n",
    "- deceased_date: the date of being deceased\n",
    "- state: isolated / released / deceased\n",
    "  > - isolated: being isolated in the hospital\n",
    "  > - released: being released from the hospital\n",
    "  > - deceased: being deceased"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>patient_id</th>\n",
       "      <th>global_num</th>\n",
       "      <th>sex</th>\n",
       "      <th>birth_year</th>\n",
       "      <th>age</th>\n",
       "      <th>country</th>\n",
       "      <th>province</th>\n",
       "      <th>city</th>\n",
       "      <th>disease</th>\n",
       "      <th>infection_case</th>\n",
       "      <th>infection_order</th>\n",
       "      <th>infected_by</th>\n",
       "      <th>contact_number</th>\n",
       "      <th>symptom_onset_date</th>\n",
       "      <th>confirmed_date</th>\n",
       "      <th>released_date</th>\n",
       "      <th>deceased_date</th>\n",
       "      <th>state</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1000000001</td>\n",
       "      <td>2.0</td>\n",
       "      <td>male</td>\n",
       "      <td>1964.0</td>\n",
       "      <td>50s</td>\n",
       "      <td>Korea</td>\n",
       "      <td>Seoul</td>\n",
       "      <td>Gangseo-gu</td>\n",
       "      <td>NaN</td>\n",
       "      <td>overseas inflow</td>\n",
       "      <td>1.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>75.0</td>\n",
       "      <td>2020-01-22</td>\n",
       "      <td>2020-01-23</td>\n",
       "      <td>2020-02-05</td>\n",
       "      <td>NaN</td>\n",
       "      <td>released</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1000000002</td>\n",
       "      <td>5.0</td>\n",
       "      <td>male</td>\n",
       "      <td>1987.0</td>\n",
       "      <td>30s</td>\n",
       "      <td>Korea</td>\n",
       "      <td>Seoul</td>\n",
       "      <td>Jungnang-gu</td>\n",
       "      <td>NaN</td>\n",
       "      <td>overseas inflow</td>\n",
       "      <td>1.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>31.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2020-01-30</td>\n",
       "      <td>2020-03-02</td>\n",
       "      <td>NaN</td>\n",
       "      <td>released</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1000000003</td>\n",
       "      <td>6.0</td>\n",
       "      <td>male</td>\n",
       "      <td>1964.0</td>\n",
       "      <td>50s</td>\n",
       "      <td>Korea</td>\n",
       "      <td>Seoul</td>\n",
       "      <td>Jongno-gu</td>\n",
       "      <td>NaN</td>\n",
       "      <td>contact with patient</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.002000e+09</td>\n",
       "      <td>17.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2020-01-30</td>\n",
       "      <td>2020-02-19</td>\n",
       "      <td>NaN</td>\n",
       "      <td>released</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1000000004</td>\n",
       "      <td>7.0</td>\n",
       "      <td>male</td>\n",
       "      <td>1991.0</td>\n",
       "      <td>20s</td>\n",
       "      <td>Korea</td>\n",
       "      <td>Seoul</td>\n",
       "      <td>Mapo-gu</td>\n",
       "      <td>NaN</td>\n",
       "      <td>overseas inflow</td>\n",
       "      <td>1.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>9.0</td>\n",
       "      <td>2020-01-26</td>\n",
       "      <td>2020-01-30</td>\n",
       "      <td>2020-02-15</td>\n",
       "      <td>NaN</td>\n",
       "      <td>released</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1000000005</td>\n",
       "      <td>9.0</td>\n",
       "      <td>female</td>\n",
       "      <td>1992.0</td>\n",
       "      <td>20s</td>\n",
       "      <td>Korea</td>\n",
       "      <td>Seoul</td>\n",
       "      <td>Seongbuk-gu</td>\n",
       "      <td>NaN</td>\n",
       "      <td>contact with patient</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.000000e+09</td>\n",
       "      <td>2.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2020-01-31</td>\n",
       "      <td>2020-02-24</td>\n",
       "      <td>NaN</td>\n",
       "      <td>released</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   patient_id  global_num     sex  birth_year  age country province  \\\n",
       "0  1000000001         2.0    male      1964.0  50s   Korea    Seoul   \n",
       "1  1000000002         5.0    male      1987.0  30s   Korea    Seoul   \n",
       "2  1000000003         6.0    male      1964.0  50s   Korea    Seoul   \n",
       "3  1000000004         7.0    male      1991.0  20s   Korea    Seoul   \n",
       "4  1000000005         9.0  female      1992.0  20s   Korea    Seoul   \n",
       "\n",
       "          city disease        infection_case  infection_order   infected_by  \\\n",
       "0   Gangseo-gu     NaN       overseas inflow              1.0           NaN   \n",
       "1  Jungnang-gu     NaN       overseas inflow              1.0           NaN   \n",
       "2    Jongno-gu     NaN  contact with patient              2.0  2.002000e+09   \n",
       "3      Mapo-gu     NaN       overseas inflow              1.0           NaN   \n",
       "4  Seongbuk-gu     NaN  contact with patient              2.0  1.000000e+09   \n",
       "\n",
       "   contact_number symptom_onset_date confirmed_date released_date  \\\n",
       "0            75.0         2020-01-22     2020-01-23    2020-02-05   \n",
       "1            31.0                NaN     2020-01-30    2020-03-02   \n",
       "2            17.0                NaN     2020-01-30    2020-02-19   \n",
       "3             9.0         2020-01-26     2020-01-30    2020-02-15   \n",
       "4             2.0                NaN     2020-01-31    2020-02-24   \n",
       "\n",
       "  deceased_date     state  \n",
       "0           NaN  released  \n",
       "1           NaN  released  \n",
       "2           NaN  released  \n",
       "3           NaN  released  \n",
       "4           NaN  released  "
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "p_info.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 3) PatientRoute\n",
    "#### Route data of COVID-19 patients in South Korea\n",
    "- patient_id: the ID of the patient\n",
    "- global_num: the number given by KCDC\n",
    "- date: YYYY-MM-DD\n",
    "- province: Special City / Metropolitan City / Province(-do)\n",
    "- city: City(-si) / Country (-gun) / District (-gu)\n",
    "- latitude: the latitude of the visit (WGS84)\n",
    "- longitude: the longitude of the visit (WGS84)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>patient_id</th>\n",
       "      <th>global_num</th>\n",
       "      <th>date</th>\n",
       "      <th>province</th>\n",
       "      <th>city</th>\n",
       "      <th>type</th>\n",
       "      <th>latitude</th>\n",
       "      <th>longitude</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1000000002</td>\n",
       "      <td>5.0</td>\n",
       "      <td>2020-01-26</td>\n",
       "      <td>Seoul</td>\n",
       "      <td>Gwangjin-gu</td>\n",
       "      <td>store</td>\n",
       "      <td>37.563992</td>\n",
       "      <td>127.029534</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1000000002</td>\n",
       "      <td>5.0</td>\n",
       "      <td>2020-01-27</td>\n",
       "      <td>Seoul</td>\n",
       "      <td>Gangbuk-gu</td>\n",
       "      <td>store</td>\n",
       "      <td>37.592057</td>\n",
       "      <td>127.018898</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1000000002</td>\n",
       "      <td>5.0</td>\n",
       "      <td>2020-01-28</td>\n",
       "      <td>Seoul</td>\n",
       "      <td>Gangbuk-gu</td>\n",
       "      <td>store</td>\n",
       "      <td>37.591669</td>\n",
       "      <td>127.018420</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1000000002</td>\n",
       "      <td>5.0</td>\n",
       "      <td>2020-01-29</td>\n",
       "      <td>Seoul</td>\n",
       "      <td>Seongbuk-gu</td>\n",
       "      <td>hospital</td>\n",
       "      <td>37.606498</td>\n",
       "      <td>127.092761</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1000000002</td>\n",
       "      <td>5.0</td>\n",
       "      <td>2020-01-30</td>\n",
       "      <td>Seoul</td>\n",
       "      <td>Seongbuk-gu</td>\n",
       "      <td>hospital</td>\n",
       "      <td>37.612772</td>\n",
       "      <td>127.098167</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   patient_id  global_num        date province         city      type  \\\n",
       "0  1000000002         5.0  2020-01-26    Seoul  Gwangjin-gu     store   \n",
       "1  1000000002         5.0  2020-01-27    Seoul   Gangbuk-gu     store   \n",
       "2  1000000002         5.0  2020-01-28    Seoul   Gangbuk-gu     store   \n",
       "3  1000000002         5.0  2020-01-29    Seoul  Seongbuk-gu  hospital   \n",
       "4  1000000002         5.0  2020-01-30    Seoul  Seongbuk-gu  hospital   \n",
       "\n",
       "    latitude   longitude  \n",
       "0  37.563992  127.029534  \n",
       "1  37.592057  127.018898  \n",
       "2  37.591669  127.018420  \n",
       "3  37.606498  127.092761  \n",
       "4  37.612772  127.098167  "
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "p_route.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 4) Time\n",
    "#### Time series data of COVID-19 status in South Korea\n",
    "- date: YYYY-MM-DD\n",
    "- time: Time (0 = AM 12:00 / 16 = PM 04:00)\n",
    "  > - The time for KCDC to open the information has been changed from PM 04:00 to AM 12:00 since March 2nd.\n",
    "- test: the accumulated number of tests\n",
    "  > - A test is a diagnosis of an infection.\n",
    "- negative: the accumulated number of negative results\n",
    "- confirmed: the accumulated number of positive results\n",
    "- released: the accumulated number of releases\n",
    "- deceased: the accumulated number of deceases"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>date</th>\n",
       "      <th>time</th>\n",
       "      <th>test</th>\n",
       "      <th>negative</th>\n",
       "      <th>confirmed</th>\n",
       "      <th>released</th>\n",
       "      <th>deceased</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2020-01-20</td>\n",
       "      <td>16</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2020-01-21</td>\n",
       "      <td>16</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2020-01-22</td>\n",
       "      <td>16</td>\n",
       "      <td>4</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2020-01-23</td>\n",
       "      <td>16</td>\n",
       "      <td>22</td>\n",
       "      <td>21</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2020-01-24</td>\n",
       "      <td>16</td>\n",
       "      <td>27</td>\n",
       "      <td>25</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         date  time  test  negative  confirmed  released  deceased\n",
       "0  2020-01-20    16     1         0          1         0         0\n",
       "1  2020-01-21    16     1         0          1         0         0\n",
       "2  2020-01-22    16     4         3          1         0         0\n",
       "3  2020-01-23    16    22        21          1         0         0\n",
       "4  2020-01-24    16    27        25          2         0         0"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "time.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 5) TimeAge\n",
    "#### Time series data of COVID-19 status in terms of the age in South Korea\n",
    "- date: YYYY-MM-DD\n",
    "  > - The status in terms of the age has been presented since March 2nd.\n",
    "- time: Time\n",
    "- age: the age of patients\n",
    "- confirmed: the accumulated number of the confirmed\n",
    "- deceased: the accumulated number of the deceased"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>date</th>\n",
       "      <th>time</th>\n",
       "      <th>age</th>\n",
       "      <th>confirmed</th>\n",
       "      <th>deceased</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2020-03-02</td>\n",
       "      <td>0</td>\n",
       "      <td>0s</td>\n",
       "      <td>32</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2020-03-02</td>\n",
       "      <td>0</td>\n",
       "      <td>10s</td>\n",
       "      <td>169</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2020-03-02</td>\n",
       "      <td>0</td>\n",
       "      <td>20s</td>\n",
       "      <td>1235</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2020-03-02</td>\n",
       "      <td>0</td>\n",
       "      <td>30s</td>\n",
       "      <td>506</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2020-03-02</td>\n",
       "      <td>0</td>\n",
       "      <td>40s</td>\n",
       "      <td>633</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         date  time  age  confirmed  deceased\n",
       "0  2020-03-02     0   0s         32         0\n",
       "1  2020-03-02     0  10s        169         0\n",
       "2  2020-03-02     0  20s       1235         0\n",
       "3  2020-03-02     0  30s        506         1\n",
       "4  2020-03-02     0  40s        633         1"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "t_age.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 6) TimeGender\n",
    "#### Time series data of COVID-19 status in terms of the gender in South Korea\n",
    "- date: YYYY-MM-DD\n",
    "  > - The status in terms of the gender has been presented since March 2nd.\n",
    "- time: Time\n",
    "- sex: the gender of patients\n",
    "- confirmed: the accumulated number of the confirmed\n",
    "- deceased: the accumulated number of the deceased"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>date</th>\n",
       "      <th>time</th>\n",
       "      <th>sex</th>\n",
       "      <th>confirmed</th>\n",
       "      <th>deceased</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2020-03-02</td>\n",
       "      <td>0</td>\n",
       "      <td>male</td>\n",
       "      <td>1591</td>\n",
       "      <td>13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2020-03-02</td>\n",
       "      <td>0</td>\n",
       "      <td>female</td>\n",
       "      <td>2621</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2020-03-03</td>\n",
       "      <td>0</td>\n",
       "      <td>male</td>\n",
       "      <td>1810</td>\n",
       "      <td>16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2020-03-03</td>\n",
       "      <td>0</td>\n",
       "      <td>female</td>\n",
       "      <td>3002</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2020-03-04</td>\n",
       "      <td>0</td>\n",
       "      <td>male</td>\n",
       "      <td>1996</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         date  time     sex  confirmed  deceased\n",
       "0  2020-03-02     0    male       1591        13\n",
       "1  2020-03-02     0  female       2621         9\n",
       "2  2020-03-03     0    male       1810        16\n",
       "3  2020-03-03     0  female       3002        12\n",
       "4  2020-03-04     0    male       1996        20"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "t_gender.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 7) TimeProvince\n",
    "#### Time series data of COVID-19 status in terms of the Province in South Korea\n",
    "- date: YYYY-MM-DD\n",
    "- time: Time\n",
    "- province: the province of South Korea\n",
    "- confirmed: the accumulated number of the confirmed in the province\n",
    "  > - The confirmed status in terms of the provinces has been presented since Feburary 21th.\n",
    "  > - The value before Feburary 21th can be different.\n",
    "- released: the accumulated number of the released in the province\n",
    "  > - The confirmed status in terms of the provinces has been presented since March 5th.\n",
    "  > - The value before March 5th can be different.\n",
    "- deceased: the accumulated number of the deceased in the province\n",
    "  > - The confirmed status in terms of the provinces has been presented since March 5th.\n",
    "  > - The value before March 5th can be different."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>date</th>\n",
       "      <th>time</th>\n",
       "      <th>province</th>\n",
       "      <th>confirmed</th>\n",
       "      <th>released</th>\n",
       "      <th>deceased</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2020-01-20</td>\n",
       "      <td>16</td>\n",
       "      <td>Seoul</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2020-01-20</td>\n",
       "      <td>16</td>\n",
       "      <td>Busan</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2020-01-20</td>\n",
       "      <td>16</td>\n",
       "      <td>Daegu</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2020-01-20</td>\n",
       "      <td>16</td>\n",
       "      <td>Incheon</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2020-01-20</td>\n",
       "      <td>16</td>\n",
       "      <td>Gwangju</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         date  time province  confirmed  released  deceased\n",
       "0  2020-01-20    16    Seoul          0         0         0\n",
       "1  2020-01-20    16    Busan          0         0         0\n",
       "2  2020-01-20    16    Daegu          0         0         0\n",
       "3  2020-01-20    16  Incheon          1         0         0\n",
       "4  2020-01-20    16  Gwangju          0         0         0"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "t_provin.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 8) Region\n",
    "#### Location and statistical data of the regions in South Korea\n",
    "- code: the code of the region\n",
    "- province: Special City / Metropolitan City / Province(-do)\n",
    "- city: City(-si) / Country (-gun) / District (-gu)\n",
    "- latitude: the latitude of the visit (WGS84)\n",
    "- longitude: the longitude of the visit (WGS84)\n",
    "- elementary_school_count: the number of elementary schools\n",
    "- kindergarten_count: the number of kindergartens\n",
    "- university_count: the number of universities\n",
    "- academy_ratio: the ratio of academies\n",
    "- elderly_population_ratio: the ratio of the elderly population\n",
    "- elderly_alone_ratio: the ratio of elderly households living alone\n",
    "- nursing_home_count: the number of nursing homes\n",
    "\n",
    "Source of the statistic: [KOSTAT (Statistics Korea)](http://kosis.kr/)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>code</th>\n",
       "      <th>province</th>\n",
       "      <th>city</th>\n",
       "      <th>latitude</th>\n",
       "      <th>longitude</th>\n",
       "      <th>elementary_school_count</th>\n",
       "      <th>kindergarten_count</th>\n",
       "      <th>university_count</th>\n",
       "      <th>academy_ratio</th>\n",
       "      <th>elderly_population_ratio</th>\n",
       "      <th>elderly_alone_ratio</th>\n",
       "      <th>nursing_home_count</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>10000</td>\n",
       "      <td>Seoul</td>\n",
       "      <td>Seoul</td>\n",
       "      <td>37.566953</td>\n",
       "      <td>126.977977</td>\n",
       "      <td>607</td>\n",
       "      <td>830</td>\n",
       "      <td>48</td>\n",
       "      <td>1.44</td>\n",
       "      <td>15.38</td>\n",
       "      <td>5.8</td>\n",
       "      <td>22739</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>10010</td>\n",
       "      <td>Seoul</td>\n",
       "      <td>Gangnam-gu</td>\n",
       "      <td>37.518421</td>\n",
       "      <td>127.047222</td>\n",
       "      <td>33</td>\n",
       "      <td>38</td>\n",
       "      <td>0</td>\n",
       "      <td>4.18</td>\n",
       "      <td>13.17</td>\n",
       "      <td>4.3</td>\n",
       "      <td>3088</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>10020</td>\n",
       "      <td>Seoul</td>\n",
       "      <td>Gangdong-gu</td>\n",
       "      <td>37.530492</td>\n",
       "      <td>127.123837</td>\n",
       "      <td>27</td>\n",
       "      <td>32</td>\n",
       "      <td>0</td>\n",
       "      <td>1.54</td>\n",
       "      <td>14.55</td>\n",
       "      <td>5.4</td>\n",
       "      <td>1023</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>10030</td>\n",
       "      <td>Seoul</td>\n",
       "      <td>Gangbuk-gu</td>\n",
       "      <td>37.639938</td>\n",
       "      <td>127.025508</td>\n",
       "      <td>14</td>\n",
       "      <td>21</td>\n",
       "      <td>0</td>\n",
       "      <td>0.67</td>\n",
       "      <td>19.49</td>\n",
       "      <td>8.5</td>\n",
       "      <td>628</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>10040</td>\n",
       "      <td>Seoul</td>\n",
       "      <td>Gangseo-gu</td>\n",
       "      <td>37.551166</td>\n",
       "      <td>126.849506</td>\n",
       "      <td>36</td>\n",
       "      <td>56</td>\n",
       "      <td>1</td>\n",
       "      <td>1.17</td>\n",
       "      <td>14.39</td>\n",
       "      <td>5.7</td>\n",
       "      <td>1080</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    code province         city   latitude   longitude  \\\n",
       "0  10000    Seoul        Seoul  37.566953  126.977977   \n",
       "1  10010    Seoul   Gangnam-gu  37.518421  127.047222   \n",
       "2  10020    Seoul  Gangdong-gu  37.530492  127.123837   \n",
       "3  10030    Seoul   Gangbuk-gu  37.639938  127.025508   \n",
       "4  10040    Seoul   Gangseo-gu  37.551166  126.849506   \n",
       "\n",
       "   elementary_school_count  kindergarten_count  university_count  \\\n",
       "0                      607                 830                48   \n",
       "1                       33                  38                 0   \n",
       "2                       27                  32                 0   \n",
       "3                       14                  21                 0   \n",
       "4                       36                  56                 1   \n",
       "\n",
       "   academy_ratio  elderly_population_ratio  elderly_alone_ratio  \\\n",
       "0           1.44                     15.38                  5.8   \n",
       "1           4.18                     13.17                  4.3   \n",
       "2           1.54                     14.55                  5.4   \n",
       "3           0.67                     19.49                  8.5   \n",
       "4           1.17                     14.39                  5.7   \n",
       "\n",
       "   nursing_home_count  \n",
       "0               22739  \n",
       "1                3088  \n",
       "2                1023  \n",
       "3                 628  \n",
       "4                1080  "
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "region.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 9) Weather\n",
    "#### Data of the weather in the regions of South Korea\n",
    "- code: the code of the region\n",
    "- province: Special City / Metropolitan City / Province(-do)\n",
    "- date: YYYY-MM-DD\n",
    "- avg_temp: the average temperature\n",
    "- min_temp: the lowest temperature\n",
    "- max_temp: the highest temperature\n",
    "- precipitation: the daily precipitation\n",
    "- max_wind_speed: the maximum wind speed\n",
    "- most_wind_direction: the most frequent wind direction\n",
    "- avg_relative_humidity: the average relative humidity\n",
    "\n",
    "Source of the weather data: [KMA (Korea Meteorological Administration)](http://data.kma.go.kr)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>code</th>\n",
       "      <th>province</th>\n",
       "      <th>date</th>\n",
       "      <th>avg_temp</th>\n",
       "      <th>min_temp</th>\n",
       "      <th>max_temp</th>\n",
       "      <th>precipitation</th>\n",
       "      <th>max_wind_speed</th>\n",
       "      <th>most_wind_direction</th>\n",
       "      <th>avg_relative_humidity</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>10000</td>\n",
       "      <td>Seoul</td>\n",
       "      <td>2016-01-01</td>\n",
       "      <td>1.2</td>\n",
       "      <td>-3.3</td>\n",
       "      <td>4.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>3.5</td>\n",
       "      <td>90.0</td>\n",
       "      <td>73.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>11000</td>\n",
       "      <td>Busan</td>\n",
       "      <td>2016-01-01</td>\n",
       "      <td>5.3</td>\n",
       "      <td>1.1</td>\n",
       "      <td>10.9</td>\n",
       "      <td>NaN</td>\n",
       "      <td>7.4</td>\n",
       "      <td>340.0</td>\n",
       "      <td>52.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>12000</td>\n",
       "      <td>Daegu</td>\n",
       "      <td>2016-01-01</td>\n",
       "      <td>1.7</td>\n",
       "      <td>-4.0</td>\n",
       "      <td>8.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>3.7</td>\n",
       "      <td>270.0</td>\n",
       "      <td>70.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>13000</td>\n",
       "      <td>Gwangju</td>\n",
       "      <td>2016-01-01</td>\n",
       "      <td>3.2</td>\n",
       "      <td>-1.5</td>\n",
       "      <td>8.1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2.7</td>\n",
       "      <td>230.0</td>\n",
       "      <td>73.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>14000</td>\n",
       "      <td>Incheon</td>\n",
       "      <td>2016-01-01</td>\n",
       "      <td>3.1</td>\n",
       "      <td>-0.4</td>\n",
       "      <td>5.7</td>\n",
       "      <td>NaN</td>\n",
       "      <td>5.3</td>\n",
       "      <td>180.0</td>\n",
       "      <td>83.9</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    code province        date  avg_temp  min_temp  max_temp  precipitation  \\\n",
       "0  10000    Seoul  2016-01-01       1.2      -3.3       4.0            NaN   \n",
       "1  11000    Busan  2016-01-01       5.3       1.1      10.9            NaN   \n",
       "2  12000    Daegu  2016-01-01       1.7      -4.0       8.0            NaN   \n",
       "3  13000  Gwangju  2016-01-01       3.2      -1.5       8.1            NaN   \n",
       "4  14000  Incheon  2016-01-01       3.1      -0.4       5.7            NaN   \n",
       "\n",
       "   max_wind_speed  most_wind_direction  avg_relative_humidity  \n",
       "0             3.5                 90.0                   73.0  \n",
       "1             7.4                340.0                   52.1  \n",
       "2             3.7                270.0                   70.5  \n",
       "3             2.7                230.0                   73.1  \n",
       "4             5.3                180.0                   83.9  "
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "weather.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 10) SearchTrend\n",
    "#### Trend data of the keywords searched in NAVER which is one of the largest portal in South Korea\n",
    "- date: YYYY-MM-DD\n",
    "- cold: the search volume of 'cold' in Korean language\n",
    "  > - The unit means relative value by setting the highest search volume in the period to 100.\n",
    "- flu: the search volume of 'flu' in Korean language\n",
    "  > - Same as above.\n",
    "- pneumonia: the search volume of 'pneumonia' in Korean language\n",
    "  > - Same as above.\n",
    "- coronavirus: the search volume of 'coronavirus' in Korean language\n",
    "  > - Same as above.\n",
    "\n",
    "\n",
    "Source of the data: [NAVER DataLab](https://datalab.naver.com/)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>date</th>\n",
       "      <th>cold</th>\n",
       "      <th>flu</th>\n",
       "      <th>pneumonia</th>\n",
       "      <th>coronavirus</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2016-01-01</td>\n",
       "      <td>0.11663</td>\n",
       "      <td>0.05590</td>\n",
       "      <td>0.15726</td>\n",
       "      <td>0.00736</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2016-01-02</td>\n",
       "      <td>0.13372</td>\n",
       "      <td>0.17135</td>\n",
       "      <td>0.20826</td>\n",
       "      <td>0.00890</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2016-01-03</td>\n",
       "      <td>0.14917</td>\n",
       "      <td>0.22317</td>\n",
       "      <td>0.19326</td>\n",
       "      <td>0.00845</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2016-01-04</td>\n",
       "      <td>0.17463</td>\n",
       "      <td>0.18626</td>\n",
       "      <td>0.29008</td>\n",
       "      <td>0.01145</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2016-01-05</td>\n",
       "      <td>0.17226</td>\n",
       "      <td>0.15072</td>\n",
       "      <td>0.24562</td>\n",
       "      <td>0.01381</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         date     cold      flu  pneumonia  coronavirus\n",
       "0  2016-01-01  0.11663  0.05590    0.15726      0.00736\n",
       "1  2016-01-02  0.13372  0.17135    0.20826      0.00890\n",
       "2  2016-01-03  0.14917  0.22317    0.19326      0.00845\n",
       "3  2016-01-04  0.17463  0.18626    0.29008      0.01145\n",
       "4  2016-01-05  0.17226  0.15072    0.24562      0.01381"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "search.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 11) SeoulFloating\n",
    "#### Data of floating population in Seoul, South Korea (from SK Telecom Big Data Hub)\n",
    "\n",
    "- date: YYYY-MM-DD\n",
    "- hour: Hour\n",
    "- birth_year: the birth year of the floating population\n",
    "- sext: he sex of the floating population\n",
    "- province: Special City / Metropolitan City / Province(-do)\n",
    "- city: City(-si) / Country (-gun) / District (-gu)\n",
    "- fp_num: the number of floating population\n",
    "\n",
    "Source of the data: [SKT Big Data Hub](https://www.bigdatahub.co.kr)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>date</th>\n",
       "      <th>hour</th>\n",
       "      <th>birth_year</th>\n",
       "      <th>sex</th>\n",
       "      <th>province</th>\n",
       "      <th>city</th>\n",
       "      <th>fp_num</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2020-01-01</td>\n",
       "      <td>0</td>\n",
       "      <td>20</td>\n",
       "      <td>female</td>\n",
       "      <td>Seoul</td>\n",
       "      <td>Dobong-gu</td>\n",
       "      <td>19140</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2020-01-01</td>\n",
       "      <td>0</td>\n",
       "      <td>20</td>\n",
       "      <td>male</td>\n",
       "      <td>Seoul</td>\n",
       "      <td>Dobong-gu</td>\n",
       "      <td>19950</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2020-01-01</td>\n",
       "      <td>0</td>\n",
       "      <td>20</td>\n",
       "      <td>female</td>\n",
       "      <td>Seoul</td>\n",
       "      <td>Dongdaemun-gu</td>\n",
       "      <td>25450</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2020-01-01</td>\n",
       "      <td>0</td>\n",
       "      <td>20</td>\n",
       "      <td>male</td>\n",
       "      <td>Seoul</td>\n",
       "      <td>Dongdaemun-gu</td>\n",
       "      <td>27050</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2020-01-01</td>\n",
       "      <td>0</td>\n",
       "      <td>20</td>\n",
       "      <td>female</td>\n",
       "      <td>Seoul</td>\n",
       "      <td>Dongjag-gu</td>\n",
       "      <td>28880</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         date  hour  birth_year     sex province           city  fp_num\n",
       "0  2020-01-01     0          20  female    Seoul      Dobong-gu   19140\n",
       "1  2020-01-01     0          20    male    Seoul      Dobong-gu   19950\n",
       "2  2020-01-01     0          20  female    Seoul  Dongdaemun-gu   25450\n",
       "3  2020-01-01     0          20    male    Seoul  Dongdaemun-gu   27050\n",
       "4  2020-01-01     0          20  female    Seoul     Dongjag-gu   28880"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "floating.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
